﻿using PropertyExpression.ControllableQuery.Test.Queries;

namespace PropertyExpression.ControllableQuery.Test
{
    public static class PropertyExpressionExtensions
    {
        public static string BillOfMaterialsHeaderId(
            this IParams<PartLinkQuery.Params> it)
        {
            return it.Param(_ => _.BillOfMaterialsHeaderId);
        }

        public static string ModelPublicationId(
            this IParams<PartLinkQuery.Params> it)
        {
            return it.Param(_ => _.ModelPublicationId);
        }

        public static string ServicePartsPageId(
            this IParams<PartLinkQuery.Params> it)
        {
            return it.Param(_ => _.ServicePartsPageId);
        }

        public static string LanguageCode(
            this IParams<WithInnerPartLinkSwitcher.Params> it)
        {
            return it.Param(_ => _.LanguageCode);
        }

        public static string ModelId(
            this IParams<WithInnerPartLinkSwitcher.Params> it)
        {
            return it.Param(_ => _.ModelId);
        }

        public static string ModelCode(
            this IParams<ModelCodeParam> it)
        {
            return it.Param(_ => _.ModelCode);
        }

        public static string ModelSequence(
            this IParams<ModelSequenceParam> it)
        {
            return it.Param(_ => _.ModelSequence);
        }

        public static string PublicationCode(
            this IParams<PublicationCodeParam> it)
        {
            return it.Param(_ => _.PublicationCode);
        }

        public static string PublicationCodes(
            this IParams<TableValuedParameterQuery.Params> it)
        {
            return it.Param(_ => _.PublicationCodes);
        }

        public static string PartNumber(
            this IDataReader<IPartLinkInfo> it)
        {
            return it.GetValue(_ => _.PartNumber);
        }
    }
}
